function S = get_changed_value_orig(C, Rc)%GET_CHANGED_VALUE_ORIG% Calculates values of S in MME papers.%    0 (0/1) -> No change%   +1 (0)   -> +2%   -1 (0)   -> -2%   N  (0/1) -> N-1 (Rc >= 0) / N+1 (Rc < 0)%% Usage :%  O = nonround_dct(img);%  C = round(O);%  Rc = C - O;%  S = get_changed_value_orig(C, Rc);%% Input:%  C  -> c''        (rounded coeffients)% Output:  %  S  -> c''        (embeded coeffients, with every value CHANGED)%    %% calcuate S (e.g. embedding in every bit)    S = C;    [P,Q] = size(S);    for i = 1:P        for j = 1:Q            if Rc(i,j) < 0                if C(i,j) == -1                    S(i,j) = -2;                else                    S(i,j) = C(i,j) + 1;                end            else % Rc(i,j) >= 0                if C(i,j) == 1                    S(i,j) = 2;                else                    S(i,j) = C(i,j) - 1;                end            end        end    endend